package com.selfdriving.activity;

import java.util.List;

import net.tsz.afinal.annotation.view.ViewInject;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;

import com.selfdriving.R;
import com.selfdriving.adapter.PersonAdapter;
import com.selfdriving.bean.User;

public class RegisterActivity extends BaseActivity
{
	@ViewInject(id = R.id.btn_login, click = "btn_login")
	Button btn_login;

	@ViewInject(id = R.id.btn_register, click = "btn_register")
	Button btn_register;

	@ViewInject(id = R.id.btn_about, click = "btn_about")
	ImageButton btn_about;

	private PersonAdapter adapter;

	private List<User> users;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.register);
		/*
		 * users = new ArrayList<User>(); for (int i = 0; i < 20; i++) { User
		 * user = new User(); users.add(user); } adapter = new
		 * PersonAdapter(this, users); person_gridview.setAdapter(adapter);
		 */
	}

	public void btn_register(View v)
	{
		Intent intent = new Intent(this, RegisterOneActivity.class);
		startActivity(intent);
	}

	public void btn_about(View v)
	{
	}

	public void btn_login(View v)
	{
		startActivity(LoginActivity.class);
		// final FlippingLoadingDialog dialog = new FlippingLoadingDialog(this,
		// "连接中，请稍后");
		// dialog.show();
		// new Handler().postDelayed(new Runnable()
		// {
		// @Override
		// public void run()
		// {
		// dialog.dismiss();
		// Intent intent = new Intent(RegisterActivity.this,
		// LoginActivity.class);
		// startActivity(intent);
		// }
		// }, 1000);
	}

	@Override
	public void onBackPressed()
	{
		finish();
	}
}
